import java.awt.BorderLayout;
import java.awt.Container;
import java.awt.Dimension;
import java.util.Vector;

import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JList;
import javax.swing.JScrollPane;


public class DeleteRestaurantDialog extends JFrame {
	private JList list;
	private JScrollPane listScroller;
	private JButton deleteButton;
	
	public DeleteRestaurantDialog() {
		Container pane = getContentPane();
		this.setSize(400,400);

		// Show list of restaurants
		list = new JList();
		listScroller = new JScrollPane(list);
		listScroller.setPreferredSize(new Dimension(250, 80));
		pane.add(listScroller, BorderLayout.CENTER);	
		
		deleteButton = new JButton("Delete");
		pane.add(deleteButton,BorderLayout.PAGE_END);
	}
	
	public JButton getDeleteButton() {
		return deleteButton;
	}
	
	public String getSelectedRestaurant() {
		return (String) list.getSelectedValue();
	}
	
	public void updateList(Vector<String> r) {
		list.setListData(r);
	}
}
